{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "d1df9832",
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "2f947493",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'cancer_or_not': 'cancer'}\n"
     ]
    }
   ],
   "source": [
    "server_url = 'http://localhost:5000/predict'\n",
    "path = './00006537328c33e284c973d7b39d340809f7271b.tif'\n",
    "files = {'image': open(path, 'rb')}\n",
    "resp = requests.post(server_url, files=files)\n",
    "print(resp.json())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "16d885fc",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
